<div>
  <div class="m-subheader">
    <div class="row align-items-center">
      <div class="mr-auto col-auto">
        <h3 class="m-subheader__title m-subheader__title--separator">
          <span>外包加工申请</span>
        </h3>
        <span class="m-section__sub">
          获取审批完成的外包加工申请单
        </span>
      </div>
    </div>
  </div>
  <div class="m-content">
    <div class="m-portlet m-portlet--mobile" style="margin: 0;">
      <div class="m-portlet__body" style="height: 724px;">
        <form class="horizontal-form" autocomplete="off">
          <div class="m-form m-form--label-align-right">
            <div class="row align-items-center m--margin-bottom-10">
              <div class="col-xl-12" style="padding: 0;">
                <div class="form-group m-form__group align-items-center">
                  <div class="input-group">
                    <input [(ngModel)]="filterText" name="filterText" autoFocus class="form-control m-input"
                      [placeholder]="l('SearchWithThreeDot')" type="text">
                    <span class="input-group-btn">
                      <button (click)="getOutsourcingAgreedList()" class="btn btn-primary" type="submit"><i
                          class="flaticon-search-1" [attr.aria-label]="l('Search')"></i></button>
                    </span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </form>
        <div class="row align-items-center">
          <!--<Primeng-TurboTable-Start>-->
          <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
            <p-table #dataTable (onLazyLoad)="getOutsourcingAgreedList($event)" [value]="outsourcings"
              rows="{{primengTableHelper.defaultRecordsCountPerPage}}" [paginator]="false" [lazy]="true"
              [scrollable]="true" ScrollWidth="100%" [responsive]="primengTableHelper.isResponsive"
              [resizableColumns]="primengTableHelper.resizableColumns">
              <ng-template pTemplate="header">
                <tr>
                  <th style="width: 100px">
                    序号
                  </th>
                  <th style="width: 250px">
                    申请单编号
                  </th>
                  <th style="width: 150px">
                    加工单编号
                  </th>
                  <th style="width: 150px">
                    供方名称
                  </th>
                  <th style="width: 150px">
                    任务编号
                  </th>
                  <th style="width: 150px">
                    任务图号
                  </th>
                  <th style="width: 150px">
                    任务名称
                  </th>
                  <th style="width: 250px">
                    加工状态
                  </th>
                  <th style="width: 130px">
                    进度要求
                  </th>
                  <th style="width: 100px">
                    加工单数量
                  </th>
                  <th style="width: 100px">
                    确认数量
                  </th>
                  <th style="width: 100px">
                    合格数量
                  </th>
                  <th style="width: 100px">
                    报废数量
                  </th>
                  <th style="width: 100px">
                    超差数量
                  </th>
                  <th style="width: 80px">
                    是否逾期
                  </th>
                  <th style="width: 80px">
                    逾期天数
                  </th>
                </tr>
              </ng-template>
              <ng-template pTemplate="body" let-record="$implicit" let-ri='rowIndex'>
                <tr>
                  <td style="width: 100px">
                   {{ ri + 1}}
                  </td>
                  <td style="width: 250px">
                    <h5><a href="javascript:;" title="点击查看申请单" (click)="Detail(record)"> {{record.requisitionCode}} </a>
                    </h5>
                    <span *ngIf="record.outsourcingType==0" class="label m-badge m-badge--success m-badge--wide"
                      data-toggle="tooltip" title="外包项目类型" data-placement="top">
                      一般过程外包项目
                    </span>
                    <span *ngIf="record.outsourcingType==1" class="label m-badge m-badge--primary m-badge--wide"
                      data-toggle="tooltip" title="外包项目类型" data-placement="top">
                      关键过程外包项目
                    </span>
                    <span *ngIf="record.applyStatus==1" class="label m-badge m-badge--success m-badge--wide"
                      data-toggle="tooltip" title="申请状态" data-placement="top">
                      完成
                    </span>
                    <span *ngIf="record.applyStatus==0" class="label m-badge m-badge--primary m-badge--wide"
                      data-toggle="tooltip" title="申请状态" data-placement="top">
                      运行
                    </span>
                  </td>
                  <th style="width: 150px">
                    <h5><a href="javascript:;" title="点击查看交货确认单" >{{record.processingCode}} </a>
                    </h5>
                  
                  </th>

                  <th style="width: 150px">
                    {{record.supplierUnit}}
                  </th>
                  <th style="width: 150px">
                    <div [ngSwitch]="record.taskCode">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span class="m--font-bold"> {{record.taskCode}}</span>
                      </div>
                    </div>
                  </th>
                  <th style="width: 150px">
                    <div [ngSwitch]="record.picNo">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span class="m--font-bold"> {{record.picNo}}</span>
                      </div>
                    </div>
                  </th>
                  <th style="width: 150px">
                    <div [ngSwitch]="record.taskName">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span class="m--font-bold"> {{record.taskName}}</span>
                      </div>
                    </div>
                  </th>
                  <th style="width: 250px">
                    {{record.processingstatus}}
                  </th>
                  <th style="width: 130px">
                    {{record.progressrequest | momentFormat:'L'}}
                  </th>
                  <th style="width: 100px">
                    {{record.processingAmount}}
                  </th>
                  <th style="width: 100px">
                    <div [ngSwitch]="record.deliveredAmount">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span class="m--font-bold"> {{record.deliveredAmount}}</span>
                      </div>
                    </div>
                  </th>
                  <th style="width: 100px">
                    <div [ngSwitch]="record.passedAmount">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span class="m--font-bold"> {{record.passedAmount}}</span>
                      </div>
                    </div>
                  </th>
                  <th style="width: 100px">
                    <div [ngSwitch]="record.noPassedAmount">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span class="m--font-bold"> {{record.noPassedAmount}}</span>
                      </div>
                    </div>
                  </th>
                  <th style="width: 100px">
                    <div [ngSwitch]="record.quantityAmount">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span class="m--font-bold"> {{record.quantityAmount}}</span>
                      </div>
                    </div>
                  </th>
                  <th style="width: 80px">
                    <div [ngSwitch]="record.isOverdue">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span *ngIf="record.isOverdue == true" class="label m-badge m-badge--success m-badge--wide"
                          data-toggle="tooltip" title="是" data-placement="top">
                          是
                        </span>
                        <span *ngIf="record.isOverdue == false" class="label m-badge m-badge--metal m-badge--wide"
                          data-toggle="tooltip" title="否" data-placement="top">
                          否
                        </span>
                      </div>
                    </div>
                  </th>
                  <th style="width: 80px">
                    <div [ngSwitch]="record.overdueDay">
                      <div *ngSwitchCase="">
                        <div class="m-loader m-loader--warning" style="width: 30px; display: inline-block;"></div>
                      </div>
                      <div *ngSwitchDefault>
                        <span class="m--font-bold"> {{record.overdueDay}}</span>
                      </div>
                    </div>
                  </th>
                </tr>
              </ng-template>
            </p-table>
            <div class="primeng-no-data" *ngIf="primengTableHelper.totalRecordsCount == 0">
              {{'NoData' | localize}}
            </div>
            <div class="primeng-paging-container">
              <p-paginator [rows]="primengTableHelper.defaultRecordsCountPerPage" #paginator
                (onPageChange)="getOutsourcingAgreedList($event)" [totalRecords]="primengTableHelper.totalRecordsCount"
                [rowsPerPageOptions]="primengTableHelper.predefinedRecordsCountPerPage">

              </p-paginator>
              <span class="total-records-count">
                {{'TotalRecordsCount' | localize:primengTableHelper.totalRecordsCount}}
              </span>
            </div>
          </div>
          <!--<Primeng-TurboTable-End>-->
        </div>
      </div>
    </div>
  </div>

 <flowworkauditdetailmodel #flowworkauditdetailmodel></flowworkauditdetailmodel>
   <!-- <processingOrderList #processingOrderList></processingOrderList>
  <flowworkauditmodel #flowworkauditform></flowworkauditmodel> -->

</div>